package container
{
	import flash.utils.Proxy;
	import flash.utils.flash_proxy;

	public class Map extends Proxy
	{
		private var obj:Object = new Object();
		private var arr:Array = new Array();
		
		public function Map()
		{
			
		}
		
		override flash_proxy function setProperty(name:*, value:*):void 
		{
			obj[name] = value;
			arr.push(name);
		}

		override flash_proxy function getProperty(name:*):* 
		{
			return obj[name];
		}
		
		public function at(index:int):*
		{
			if(index <0 && index > arr.length)
			{
				return null;
			}
			return obj[arr[index]];
		}
		
		
		public function get size():int
		{
			return arr.length;
		}
	}
}